package infraestructura;

public class ProductDAO {

    public static ProductPersistence getDAO(String persistenceMechanism) {
        if (persistenceMechanism.equals("memory")) {
            return ProductMemoryPersistence.getPersistenceManager();
        } else if ("db".equals(persistenceMechanism)) {
            return ProductPoolPersistence.getPersistenceManager();
        } else {
            return null;
        }
    }
}
